import request from '@/utils/request'

// 查询课程-教师关联列表
export function listCourse_teacher(query) {
  return request({
    url: '/course_design/course-teacher/list',
    method: 'get',
    params: query
  })
}

// 查询课程-教师关联详细
export function getCourse_teacher(teacherId) {
  return request({
    url: '/course_design/course-teacher/' + teacherId,
    method: 'get'
  })
}

// 新增课程-教师关联
export function addCourse_teacher(data) {
  return request({
    url: '/course_design/course-teacher',
    method: 'post',
    data: data
  })
}

// 修改课程-教师关联
export function updateCourse_teacher(data) {
  return request({
    url: '/course_design/course-teacher',
    method: 'put',
    data: data
  })
}

// 删除课程-教师关联
export function delCourse_teacher(teacherId) {
  return request({
    url: '/course_design/course-teacher/' + teacherId,
    method: 'delete'
  })
}

// 查询自己负责的课程信息（负责教师）
export function getCourseListChargedBySelf() {
  return request({
    url: '/coursedesign/course_message/courseListChargedBySelf',
    method: 'get'
  })
}

// 查询具有某角色的所有用户
export function listByRole(rolekey) {
  return request({
    url: '/system/user/listByRole/' + rolekey,
    method: 'get'
  })
}
